package cn.stylefeng.guns.modular.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("datong_article")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class Article implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 题目
     */
    @TableField(value = "title")
    private String title;

    /**
     * 作者
     */
    @TableField(value = "author")
    private String author;

    /**
     * 发布时间
     */
    @TableField(value = "published_at")
    private Date publishedAt;

    /**
     * 内容
     */
    @TableField(value = "content")
    private String content;


    /**
     * 封面图片数
     */
    @TableField(exist = false)
    private Integer thumbnailNum;

    /**
     * 封面图片1
     */
    @TableField(value = "thumbnail_s1")
    private String thumbnail_s1;

    /**
     * 封面图片2
     */
    @TableField(value = "thumbnail_s2")
    private String thumbnail_s2;

    /**
     * 封面图片3
     */
    @TableField(value = "thumbnail_s3")
    private String thumbnail_s3;


    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    private Date createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at")
    private Date updatedAt;

}
